cd ###The directory for all the replicaateion files on your computer###

log using "US_final_replication.txt",text replace

/* Replication for "Self-Centered Inequity Aversion and the Mass Politics of Taxation" */
/* Published in Comparative Political Studies 										   */
/* This file replicates the statistical results for the United States Only             */
/* Xiaobo Lu  and Ken Scheve   */
/* July 8,  2016             */

# delimit;
clear;
set more off;


use US_final_replication.dta, clear;

/*************************************************/
/* Statistical results reported in the main text */
/*************************************************/

/* TABLE - 3: Estimated Effect of Income Threshold on Support for Income Tax Increases to Reduce the Dedicit - United States */
/* Comparison between low and middle income */
ttest deficittaxop1 if deficittaxtreat1==1|deficittaxtreat1==2, by(deficittaxtreat1) unequal;
/* Comparison between low and high income */
ttest deficittaxop1 if deficittaxtreat1==1|deficittaxtreat1==3, by(deficittaxtreat1) unequal;
/* Comparison between middle and high income */
ttest deficittaxop1 if deficittaxtreat1==2|deficittaxtreat1==3, by(deficittaxtreat1) unequal;

/* Mean comparison for income less than 40K */
/* Comparison between low and middle income */
ttest deficittaxop1 if (deficittaxtreat1==1|deficittaxtreat1==2) & personalinc<=10, by(deficittaxtreat1) unequal;
/* Comparison between low and high income */
ttest deficittaxop1 if (deficittaxtreat1==1|deficittaxtreat1==3) & personalinc<=10, by(deficittaxtreat1) unequal;
/* Comparison between middle and high income */
ttest deficittaxop1 if (deficittaxtreat1==2|deficittaxtreat1==3) & personalinc<=10, by(deficittaxtreat1) unequal;

/* Mean comparison for income greater than 125K */
/* Comparison between low and middle income */
ttest deficittaxop1 if (deficittaxtreat1==1|deficittaxtreat1==2) & personalinc>16, by(deficittaxtreat1) unequal;
/* Comparison between low and high income */
ttest deficittaxop1 if (deficittaxtreat1==1|deficittaxtreat1==3) & personalinc>16, by(deficittaxtreat1) unequal;
/* Comparison between middle and high income */
ttest deficittaxop1 if (deficittaxtreat1==2|deficittaxtreat1==3) & personalinc>16, by(deficittaxtreat1) unequal;


/* TABLE - 4: Estimated Effect of Income Threshold on Support for Progressive Income - United States */
/* US Panel */
/* Comparison between low and middle income */
ttest taxshareop1_d if taxsharetreat1==1|taxsharetreat1==2, by(taxsharetreat1) unequal;
/* Comparison between low and high income */
ttest taxshareop1_d if taxsharetreat1==1|taxsharetreat1==3, by(taxsharetreat1) unequal;
/* Comparison between middle and high income */
ttest taxshareop1_d if taxsharetreat1==2|taxsharetreat1==3, by(taxsharetreat1) unequal;

/* Mean comparison for income less than 40K */
/* Comparison between low and middle income */
ttest taxshareop1_d if (taxsharetreat1==1|taxsharetreat1==2) & personalinc<=10, by(taxsharetreat1) unequal;
/* Comparison between low and high income */
ttest taxshareop1_d if (taxsharetreat1==1|taxsharetreat1==3) & personalinc<=10, by(taxsharetreat1) unequal;
/* Comparison between middle and high income */
ttest taxshareop1_d if (taxsharetreat1==2|taxsharetreat1==3) & personalinc<=10, by(taxsharetreat1) unequal;

/* Mean comparison for income greater than 125K */
/* Comparison between low and middle income */
ttest taxshareop1_d if (taxsharetreat1==1|taxsharetreat1==2) & personalinc>16, by(taxsharetreat1) unequal;
/* Comparison between low and high income */
ttest taxshareop1_d if (taxsharetreat1==1|taxsharetreat1==3) & personalinc>16, by(taxsharetreat1) unequal;
/* Comparison between middle and high income */
ttest taxshareop1_d if (taxsharetreat1==2|taxsharetreat1==3) & personalinc>16, by(taxsharetreat1) unequal;


/* TABLE - 5 Support for Income Tax Increases to Reduce Budget Deficit - United States  */
/* Probit Estimates:  Regression Estimates of Inequity advantageous & disadvantageous parameters */
/* Only the income greater */
xi: probit deficittaxop1 alphincDEFd2 betaincDEFd2  DEFi1 , robust;
xi: probit deficittaxop1 alphincDEFd2 betaincDEFd2  DEFi1 collegegradp female ageyears i.state, robust;


/* TABLE - 6 Support for Progressive Income Tax|United States, Regression Estimates of Inequity advantageous & disadvantageous parameters */
/* Only the income greater */
xi: probit taxshareop1_d alphincTSHd2 betaincTSHd2  TSHi1 , robust;
xi: probit taxshareop1_d alphincTSHd2 betaincTSHd2  TSHi1 collegegradp female ageyears i.state, robust;


/* TABLE - 7: Estimated effect of Average Wage on Support for Increased Banking Regulation - United States */
/* Comparison between 50,000 and 100,000 treatments, excluding banking industry workers */
ttest bankregop1 if industry~=10, by(bankregtreat1) unequal;


/* TABLE - 8: Support for Increased Banking Regulation - United States, Probit Estimates. Estimate the advantageous and disadvantageous parameters */
xi: probit bankregop1 alphincBREGd2 betaincBREGd2 if industry~=10, robust;
xi: probit bankregop1 alphincBREGd2 betaincBREGd2 BREGi1 collegegradp female ageyears i.state if industry~=10, robust;


/************************************************/
/* Statistical results reported in the appendix */
/************************************************/

/* TABLE A-1: Descriptive Statistics */
sum deficittaxop1 deficittaxop2 taxshareop1_d taxshareop2  bankregop1 bankregop2  tradeop1 tradeop2  female ageyears collegegradp black latino married consideol partyid;


/* TABLE A-3: Two-group mean-comparison tests for randomization */
/* Tax increase for deficit reduction experiment */

/* By gender */
ttest female if deficittaxtreat1==1 | deficittaxtreat1==2, by(deficittaxtreat1)  unequal ;
ttest female if deficittaxtreat1==1 | deficittaxtreat1==3, by(deficittaxtreat1)  unequal ;
ttest female if deficittaxtreat1==2 | deficittaxtreat1==3, by(deficittaxtreat1)  unequal ;

/* By age */
ttest ageyears if deficittaxtreat1==1 | deficittaxtreat1==2, by(deficittaxtreat1)  unequal ;
ttest ageyears if deficittaxtreat1==1 | deficittaxtreat1==3, by(deficittaxtreat1)  unequal ;
ttest ageyears if deficittaxtreat1==2 | deficittaxtreat1==3, by(deficittaxtreat1)  unequal ;

/* By educ */
ttest collegegradp if deficittaxtreat1==1 | deficittaxtreat1==2, by(deficittaxtreat1)  unequal ;
ttest collegegradp if deficittaxtreat1==1 | deficittaxtreat1==3, by(deficittaxtreat1)  unequal ;
ttest collegegradp if deficittaxtreat1==2 | deficittaxtreat1==3, by(deficittaxtreat1)  unequal ;

/* By income */
ttest personalinc if deficittaxtreat1==1 | deficittaxtreat1==2, by(deficittaxtreat1)  unequal ;
ttest personalinc if deficittaxtreat1==1 | deficittaxtreat1==3, by(deficittaxtreat1)  unequal ;
ttest personalinc if deficittaxtreat1==2 | deficittaxtreat1==3, by(deficittaxtreat1)  unequal ;

/* Progessive tax share experiment */

/* By gender */
ttest female if taxsharetreat1==1 | taxsharetreat1==2, by(taxsharetreat1)  unequal ;
ttest female if taxsharetreat1==1 | taxsharetreat1==3, by(taxsharetreat1)  unequal ;
ttest female if taxsharetreat1==2 | taxsharetreat1==3, by(taxsharetreat1)  unequal ;

/* By age */
ttest ageyears if taxsharetreat1==1 | taxsharetreat1==2, by(taxsharetreat1)  unequal ;
ttest ageyears if taxsharetreat1==1 | taxsharetreat1==3, by(taxsharetreat1)  unequal ;
ttest ageyears if taxsharetreat1==2 | taxsharetreat1==3, by(taxsharetreat1)  unequal ;

/* By educ */
ttest collegegradp if taxsharetreat1==1 | taxsharetreat1==2, by(taxsharetreat1)  unequal ;
ttest collegegradp if taxsharetreat1==1 | taxsharetreat1==3, by(taxsharetreat1)  unequal ;
ttest collegegradp if taxsharetreat1==2 | taxsharetreat1==3, by(taxsharetreat1)  unequal ;

/* By income */
ttest personalinc if taxsharetreat1==1 | taxsharetreat1==2, by(taxsharetreat1)  unequal ;
ttest personalinc if taxsharetreat1==1 | taxsharetreat1==3, by(taxsharetreat1)  unequal ;
ttest personalinc if taxsharetreat1==2 | taxsharetreat1==3, by(taxsharetreat1)  unequal ;


/* TABLE A-5  Analysis of Income Tax Opinion 2 */
/* Comparison between low and middle income */
ttest deficittaxop2 if deficittaxtreat1==1|deficittaxtreat1==2, by(deficittaxtreat1) unequal;
/* Comparison between low and high income */
ttest deficittaxop2 if deficittaxtreat1==1|deficittaxtreat1==3, by(deficittaxtreat1) unequal;
/* Comparison between middle and high income */
ttest deficittaxop2 if deficittaxtreat1==2|deficittaxtreat1==3, by(deficittaxtreat1) unequal;

/* Mean comparison for income less than 40K */
/* Comparison between low and middle income */
ttest deficittaxop2 if (deficittaxtreat1==1|deficittaxtreat1==2) & personalinc<=10, by(deficittaxtreat1) unequal;
/* Comparison between low and high income */
ttest deficittaxop2 if (deficittaxtreat1==1|deficittaxtreat1==3) & personalinc<=10, by(deficittaxtreat1) unequal;
/* Comparison between middle and high income */
ttest deficittaxop2 if (deficittaxtreat1==2|deficittaxtreat1==3) & personalinc<=10, by(deficittaxtreat1) unequal;

/* Mean comparison for income greater than 125K */
/* Comparison between low and middle income */
ttest deficittaxop2 if (deficittaxtreat1==1|deficittaxtreat1==2) & personalinc>16, by(deficittaxtreat1) unequal;
/* Comparison between low and high income */
ttest deficittaxop2 if (deficittaxtreat1==1|deficittaxtreat1==3) & personalinc>16, by(deficittaxtreat1) unequal;
/* Comparison between middle and high income */
ttest deficittaxop2 if (deficittaxtreat1==2|deficittaxtreat1==3) & personalinc>16, by(deficittaxtreat1) unequal;


/* TABLE A-6: Support for Income Tax Increases to Reduce Budget Deficit - United States  */
/* Probit Estimates:  Regression Estimates of Inequity advantageous & disadvantageous parameters */
/* Income Tax Opinion 2 */
xi: oprobit deficittaxop2 alphincDEFd2 betaincDEFd2 DEFi1 , robust;
xi: oprobit deficittaxop2 alphincDEFd2 betaincDEFd2 DEFi1 collegegradp female ageyears i.state, robust;


/* TABLE A-7  Analysis of Progressive Tax Opinion 2 */
/* Comparison between low and middle income */
ttest taxshareop2 if taxsharetreat1==1|taxsharetreat1==2, by(taxsharetreat1) unequal;
/* Comparison between low and high income */
ttest taxshareop2 if taxsharetreat1==1|taxsharetreat1==3, by(taxsharetreat1) unequal;
/* Comparison between middle and high income */
ttest taxshareop2 if taxsharetreat1==2|taxsharetreat1==3, by(taxsharetreat1) unequal;

/* Mean comparison for income less than 40K */
/* Comparison between low and middle income */
ttest taxshareop2 if (taxsharetreat1==1|taxsharetreat1==2) & personalinc<=10, by(taxsharetreat1) unequal;
/* Comparison between low and high income */
ttest taxshareop2 if (taxsharetreat1==1|taxsharetreat1==3) & personalinc<=10, by(taxsharetreat1) unequal;
/* Comparison between middle and high income */
ttest taxshareop2 if (taxsharetreat1==2|taxsharetreat1==3) & personalinc<=10, by(taxsharetreat1) unequal;

/* Mean comparison for income greater than 125K */
/* Comparison between low and middle income */
ttest taxshareop2 if (taxsharetreat1==1|taxsharetreat1==2) & personalinc>16, by(taxsharetreat1) unequal;
/* Comparison between low and high income */
ttest taxshareop2 if (taxsharetreat1==1|taxsharetreat1==3) & personalinc>16, by(taxsharetreat1) unequal;
/* Comparison between middle and high income */
ttest taxshareop2 if (taxsharetreat1==2|taxsharetreat1==3) & personalinc>16, by(taxsharetreat1) unequal;


/* TABLE A-8 Support for Progressive Income Tax|United States, Regression Estimates of Inequity advantageous & disadvantageous parameters */
/* Progressive Tax Opinion 2 */
xi: oprobit taxshareop2 alphincTSHd2 betaincTSHd2  TSHi1, robust;
xi: oprobit taxshareop2 alphincTSHd2 betaincTSHd2  TSHi1 collegegradp female ageyears i.state, robust;


/* TABLE A-9: Estimated Effect of Income Threshold on Support for Income Tax Increases to Reduce the Deficit, controlling sex, age, and education */
/* Full sample */
reg deficittaxop1 DEFtreatmentlow collegegradp female ageyears if deficittaxtreat1==1|deficittaxtreat1==2, robust;
reg deficittaxop1 DEFtreatmentlow collegegradp female ageyears if deficittaxtreat1==1|deficittaxtreat1==3, robust;
reg deficittaxop1 DEFtreatmentmiddle collegegradp female ageyears if deficittaxtreat1==3|deficittaxtreat1==2, robust;

/* Mean comparison for income less than 40K */
reg deficittaxop1 DEFtreatmentlow collegegradp female ageyears if (deficittaxtreat1==1|deficittaxtreat1==2) & personalinc<=10, robust;
reg deficittaxop1 DEFtreatmentlow collegegradp female ageyears if (deficittaxtreat1==1|deficittaxtreat1==3) & personalinc<=10, robust;
reg deficittaxop1 DEFtreatmentmiddle collegegradp female ageyears if (deficittaxtreat1==2|deficittaxtreat1==3) & personalinc<=10, robust;

/* Mean comparison for income greater than 125K */
reg deficittaxop1 DEFtreatmentlow collegegradp female ageyears if (deficittaxtreat1==1|deficittaxtreat1==2) & personalinc>16, robust;
reg deficittaxop1 DEFtreatmentlow collegegradp female ageyears if (deficittaxtreat1==1|deficittaxtreat1==3) & personalinc>16, robust;
reg deficittaxop1 DEFtreatmentmiddle collegegradp female ageyears if (deficittaxtreat1==2|deficittaxtreat1==3) & personalinc>16, robust;

/* TABLE A-10: Estimated Effect of Income Threshold on Support for Progressive income tax, controlling sex, age, and education */
/* Progressive tax */
/* Estimated differences across treatment categories controlling for sex, age, and education */
/* Full sample */
reg taxshareop1_d TSHtreatmentlow collegegradp female ageyears if taxsharetreat1==1|taxsharetreat1==2, robust;
reg taxshareop1_d TSHtreatmentlow collegegradp female ageyears if taxsharetreat1==1|taxsharetreat1==3, robust;
reg taxshareop1_d TSHtreatmentmiddle collegegradp female ageyears if taxsharetreat1==3|taxsharetreat1==2, robust;

/* Mean comparison for income less than 40K */
reg taxshareop1_d TSHtreatmentlow collegegradp female ageyears if (taxsharetreat1==1|taxsharetreat1==2) & personalinc<=10, robust;
reg taxshareop1_d TSHtreatmentlow collegegradp female ageyears if (taxsharetreat1==1|taxsharetreat1==3) & personalinc<=10, robust;
reg taxshareop1_d TSHtreatmentmiddle collegegradp female ageyears if (taxsharetreat1==2|taxsharetreat1==3) & personalinc<=10, robust;

/* Mean comparison for income greater than 125K */
reg taxshareop1_d TSHtreatmentlow collegegradp female ageyears if (taxsharetreat1==1|taxsharetreat1==2) & personalinc>16, robust;
reg taxshareop1_d TSHtreatmentlow collegegradp female ageyears if (taxsharetreat1==1|taxsharetreat1==3) & personalinc>16, robust;
reg taxshareop1_d TSHtreatmentmiddle collegegradp female ageyears if (taxsharetreat1==2|taxsharetreat1==3) & personalinc>16, robust;


/* TABLE A-11: Vuong Test Statistics */
/* See R Files for data analysis */


/* TABLE A-12: Trade experiment */

/* Comparison between low and middle income */
ttest tradeop1 if tradetreat1==1|tradetreat1==2, by(tradetreat1) unequal;

/* Comparison between low and high income */
ttest tradeop1 if tradetreat1==1|tradetreat1==3, by(tradetreat1) unequal;

/* Comparison between middle and high income */
ttest tradeop1 if tradetreat1==2|tradetreat1==3, by(tradetreat1) unequal;


/* TABLE A-14: Estimating advantageous and disadvantageous parameters in the Trade experiment */
/* Estimate the advantageous and disadvantageous parameters */
xi: probit tradeop1 alphincTRd2 betaincTRd2, robust;
xi: probit tradeop1 alphincTRd2 betaincTRd2 personalinc2thou TRi1  TRpersonalinc2thouxi1, robust;
xi: probit tradeop1 alphincTRd2 betaincTRd2 personalinc2thou TRi1  TRpersonalinc2thouxi1 collegegradp female ageyears i.state, robust;
xi: probit tradeop1 alphincTRd2 betaincTRd2 personalinc2thou TRi1  TRpersonalinc2thouxi1 collegegradp female ageyears i.state i.industry, robust;



/* TABLE A-15 Estimated Effect of Income Threshold on Support for New Tax on Banking Incomes - United States */
/* Low cost treatment */
/* Comparison between low and middle income, high efficiency*/
ttest bankbonusop1 if (bankbonustreat1==1|bankbonustreat1==3) & industry~=10, by(bankbonustreat1) unequal;
/* Comparison between low and high income, high efficiency */
ttest bankbonusop1 if (bankbonustreat1==1|bankbonustreat1==5) & industry~=10, by(bankbonustreat1) unequal;
/* Comparison between middle and high income, high efficiency */
ttest bankbonusop1 if (bankbonustreat1==3|bankbonustreat1==5) & industry~=10, by(bankbonustreat1) unequal;

/* High cost treatment */
/* Comparison between low and middle income, low efficiency*/
ttest bankbonusop1 if (bankbonustreat1==2|bankbonustreat1==4) & industry~=10, by(bankbonustreat1) unequal;
/* Comparison between low and high income, low efficiency */
ttest bankbonusop1 if (bankbonustreat1==2|bankbonustreat1==6) & industry~=10, by(bankbonustreat1) unequal;
/* Comparison between middle and high income, low efficiency */
ttest bankbonusop1 if (bankbonustreat1==4|bankbonustreat1==6) & industry~=10, by(bankbonustreat1) unequal;


/* TABLE A-16: Regression Estimates of Inequity advantageous & disadvantageous parameters */
/* Bank bounus tax with inefficiency experiment */
/* In all the analysis below, we exclude individuals working in the financial industries */
/* We only estimate the envy parameter because the most people's income is less than the treatment income */
/* High efficiency */
xi: probit bankbonusop1 alphincBB1d2 if (bankbonustreat1==1|bankbonustreat1==3 | bankbonustreat1==5) & industry~=10, robust;
xi: probit bankbonusop1 alphincBB1d2 personalinc2thou BB1i1  BB1personalinc2thouxi1   collegegradp female ageyears i.state if (bankbonustreat1==1|bankbonustreat1==3 | bankbonustreat1==5) & industry~=10, robust;

/* Low efficiency */
xi: probit bankbonusop1 alphincBB1d2 if (bankbonustreat1==2| bankbonustreat1==4 | bankbonustreat1==6) & industry~=10, robust;
xi: probit bankbonusop1 alphincBB1d2 personalinc2thou BB1i1  BB1personalinc2thouxi1  collegegradp female ageyears i.state if (bankbonustreat1==2| bankbonustreat1==4 | bankbonustreat1==6) & industry~=10, robust;


/* TABLE A-18: Replicate Main results by controlling more demographic and political ideology measures */
/* Support for Income Tax Increases to Reduce Budget Deficit - United States  */
/* Additional demographic controls */
xi: probit deficittaxop1 alphincDEFd2 betaincDEFd2  DEFi1 collegegradp female ageyears married black latino i.state, robust;
/* Additional demographic controls + political ideology*/
xi: probit deficittaxop1 alphincDEFd2 betaincDEFd2  DEFi1 collegegradp female ageyears married black latino consideol partyid  i.state, robust;


/* TABLE A-19: Support for Progressive Income Tax|United States, Regression Estimates of Inequity advantageous & disadvantageous parameters */
/* Additional demographic controls */
xi: probit taxshareop1_d alphincTSHd2 betaincTSHd2  TSHi1 collegegradp female ageyears married black latino i.state, robust;
/* Additional demographic controls + political ideology*/
xi: probit taxshareop1_d alphincTSHd2 betaincTSHd2  TSHi1 collegegradp female ageyears married black latino consideol partyid i.state, robust;


/* TABLE A-20: Paying for Equality */
use Follow-up_experiment_data_table_a20.dta,clear;

tab taxincrease_dfit if personalinc_btw25k_200k==1;

tab taxincrease_dfit if personalinc_btw25k_200k==1 & taxincrease_dfit_rich==4;
tab taxincrease_dfit if personalinc_btw25k_200k==1 & taxincrease_dfit_rich==3;
tab taxincrease_dfit if personalinc_btw25k_200k==1 & taxincrease_dfit_rich==2;
tab taxincrease_dfit if personalinc_btw25k_200k==1 & taxincrease_dfit_rich==1;

tab taxincrease_dfit if personalinc_btw25k_200k==1 & taxincrease_dfit_poor==4;
tab taxincrease_dfit if personalinc_btw25k_200k==1 & taxincrease_dfit_poor==3;
tab taxincrease_dfit if personalinc_btw25k_200k==1 & taxincrease_dfit_poor==2;
tab taxincrease_dfit if personalinc_btw25k_200k==1 & taxincrease_dfit_poor==1;


log close;

